External Subroutines

There may be some cases where you need to perform actions ProModel is not capable of doing. You may need extended capabilities with more sophisticated commands. ProModel allows you to interface with external subroutines located in thirty-two bit Windows DLL files you have created. This feature could be useful for doing sophisticated file I/O, performing statistical analysis, making your simulation interactive, or helping with other simulation needs.

Because of the intricacies of the Windows development environment, you must have a sound knowledge of your external programming language (C, C++, Pascal) to use external subroutines. In addition, you must also have a good Windows platform knowledge, specifically with respect to creating DLLs in your language. Because it is a 32-bit program, ProModel can load and call only 32-bit DLLs, and requires that you use a 32-bit Windows compiler.

For more information about this feature, you can load, study and run XSUB.MOD in the reference model directory. See Xsub() for more information. This model uses XSUB.DLL, found in the MODELS directory. The source code and make files for XSUB.DLL (XSUB.CPP, XSUB.MAK, XSUB.IDE) are also included in the MODELS directory. Some general explanation is contained in the comments of this source code.

Due to the complexities of Windows programming and the variety of uses for this advanced feature, PROMODEL Corporation can only provide minimal support for this feature. Many questions regarding Windows programming and other programming languages cannot be handled through our customer support department. Please consult your language programming manuals, language customer service centers, Microsoft, and other resources to resolve these types of problems.